package com.henau.lx.pojo;

import java.io.Serializable;
import java.util.Objects;

//用户
public class User implements Serializable {
    private String name; //用户姓名
    private String userId;//用户id；
    private String password; //用户密码
    private String number; // 用户手机号

    public User() {
    }

    public User(String name, String userId, String password, String number) {
        this.name = name;
        this.userId = userId;
        this.password = password;
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(name, user.name) &&
                Objects.equals(userId, user.userId) &&
                Objects.equals(password, user.password) &&
                Objects.equals(number, user.number);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, userId, password, number);
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", userId='" + userId + '\'' +
                ", password='" + password + '\'' +
                ", number='" + number + '\'' +
                '}';
    }
}
